ifndef $(ver)
ver=
endif

CC=arm-hisiv600-linux-gcc
AR=arm-hisiv600-linux-ar
CFLAGS=-Wall -g -DNDEBUG -D_GNU_SOURCE -D D_TIMEOUT  $(INCPATH) -fPIC -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -mno-unaligned-access -fno-aggressive-loop-optimizations -ffunction-sections

INCPATH=-I ../h/utils/ -I ../h/ -I ../../

OUTLIBPATH=../lib/

SRCS := $(wildcard *.c)
OBJS := $(patsubst %.c, %.o, $(SRCS))

ifdef X64
	LIBNAME=$(OUTLIBPATH)/libutils_x64$(ver).a
else ifdef UBT_X64
	LIBNAME=$(OUTLIBPATH)/libutils_ubt_x64$(ver).a
else
	LIBNAME=$(OUTLIBPATH)/libutils$(ver).a
endif

$(LIBNAME): $(OBJS)
	$(AR) cr $(LIBNAME) $(OBJS)

all: $(LIBNAME)

clean:
	-rm -f *.o $(LIBNAME) $(PROGNAME)




